﻿using System;
using System.Collections.Generic;
using FrankJie.Model;
namespace FrankJie.IDAL
{
	/// <summary>
    /// 分类接口
	/// </summary>
	public interface ICategory
	{
		/// <summary>
		/// 增加一个分类
		/// </summary>
		/// <param name="model">分类实体</param>
		/// <returns>返回分类ID</returns>
        int Add(CategoryInfo categoryInfo);

        /// <summary>
        /// 增加分类所拥有的数量
        /// </summary>
        /// <param name="pid">ID</param>
        /// <param name="objectType">类别 枚举ObjectType</param>
        /// <returns>返回是否成功</returns>
        bool AddCount(int id, int objectType);

        /// <summary>
        /// 更新一个分类
        /// </summary>
        /// <param name="categoryInfo">分类实体</param>
        /// <returns>返回是否成功</returns>
        bool Update(CategoryInfo categoryInfo);

		/// <summary>
        /// 删除一个分类
		/// </summary>
		/// <param name="Id">分类ID</param>
		/// <returns>返回是否成功</returns>
        bool Delete(int id);

        /// <summary>
        /// 获取分类列表
        /// </summary>
        /// <returns>返回分类集合</returns>
        List<CategoryInfo> GetList();
	} 
}
